Class java.net.ContentHandler
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.net.ContentHandler

Object
   |
   +----java.net.ContentHandler

public abstract class ContentHandler
extends Object
The abstract class ContentHandler is the superclass of all classes that read an Object from a URLConnection.

An application does not generally call the getContent method in this class directly. Instead, an application calls the getContent method in class URL or in URLConnection. The application's content handler factory (an instance of a class that implements the interface ContentHandlerFactory set up by a call to setContentHandler) is called with a String giving the MIME type of the object being received on the socket. The factory returns an instance of a subclass of ContentHandler, and its getContent method is called to create the object.

Version:
1.8, 07/01/98
Author:
James Gosling
Since:
JDK1.0
See Also:
getContent(java.net.URLConnection), ContentHandlerFactory, getContent(), URLConnection, getContent(), setContentHandlerFactory(java.net.ContentHandlerFactory)

Constructor Index

 o java.net.ContentHandler()

Method Index

 o getContent(URLConnection)
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

Constructors

 o ContentHandler
public ContentHandler()

Methods

 o getContent
public abstract java.lang.Object getContent(URLConnection urlc) throws IOException
Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

Parameters:
urlc - a URL connection.
Returns:
the object read by the ContentHandler.
Throws: IOException
if an I/O error occurs while reading the object.
Since:
JDK1.0

All Packages  Class Hierarchy  This Package  Previous  Next  Index